package com.mediacloud.app.newsmodule.activity.audio

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.mediacloud.app.newsmodule.R

data class SelectProgramItem(val title: String, val value: Int)
class SelectProgramAdapter :
    BaseQuickAdapter<SelectProgramItem, BaseViewHolder>(R.layout.item_select_program) {
    var selectPosition = 0
    override fun convert(helper: BaseViewHolder, item: SelectProgramItem?) {
        val titleTv = helper.getView<TextView>(R.id.titleTv)
        titleTv.text = item?.title
        titleTv.isSelected = helper.absoluteAdapterPosition == selectPosition
    }
}